home *** CD-ROM | disk | FTP | other *** search
- Path: news1.sunbelt.net!usenet
- From: bourne@infoave.net (Rick Huebner)
- Newsgroups: comp.lang.c,comp.lang.c++
- Subject: returning an array from function
- Date: 3 Apr 1996 04:04:56 GMT
- Organization: SunBelt.Net INTERNET Access
- Distribution: world
- Message-ID: <4jstd8$kh0@news1.sunbelt.net>
- Reply-To: bourne@infoave.net
- NNTP-Posting-Host: dial-1.r2.gastbo.infoave.net
- X-Newsreader: NeoLogic News for OS/2 [version: 4.5 YO Beta]
-
- I have looked in several texts and looked through the faq for this question
- and can't find a reference for my answer. I am trying to return an array, or
- a pointer to the array, from a function. I have seen several examples of
- returning a pointer, but it doesn't seem to work for me. My function is going
- to return an array of integers where 1-80 of them will be significant. The
- calling function will know how many integers are expected and will read them
- off the array....If I can get the pointer back to the array. A friend of mine
- told me to just make the array a global, but I don't want to do that if I can
- help it. I would even resort to a recursive function that will pass the
- integers back one at a time if that is possible. Does anyone have any
- suggestions? I am open to anything and will go looking if you can tell me
- where(hopefully online somewhere).
-
- Thanks...
-
- --
- Rick Huebner EMT-P FF BS
- Team OS/2 bourne@InfoAve.net
- Warping along the Internet
-
-